package com.zboot.zbootadmin.project.base.command;

public class PagingCommand {

    private int page = 1;

    private int pageSize = 10;

    public PagingCommand() {
    }

    public int getPage() {
        return this.page;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPage(final int page) {
        this.page = page;
    }

    public void setPageSize(final int pageSize) {
        this.pageSize = pageSize;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof PagingCommand)) {
            return false;
        } else {
            PagingCommand other = (PagingCommand)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (this.getPage() != other.getPage()) {
                return false;
            } else {
                return this.getPageSize() == other.getPageSize();
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PagingCommand;
    }

    public int hashCode() {
        int result = 1;
        result = result * 59 + this.getPage();
        result = result * 59 + this.getPageSize();
        return result;
    }

    public String toString() {
        return "PagingCommand(page=" + this.getPage() + ", pageSize=" + this.getPageSize() + ")";
    }
}
